<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Show Project</title>
    </head>
    <body>
        <div class="nav">
	    <span class="menuButton"><g:link class="home" controller="person" action="home">Home</g:link></span>          
            
		<g:if test="${!params.projectGroupId & session.user.role.name != 'Student'}">
	          <span class="menuButton"><g:link class="list" action="list">Project List</g:link></span>
	          <span class="menuButton"><g:link class="create" action="create">New Project</g:link></span>
	    	</g:if>
	   
        </div>
        <div class="body">
            <h1>Show Project</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="dialog">
                <table>
                    <tbody>

                    
                        <tr class="prop">
                            <td valign="top" class="name">Id:</td>
                            
                            <td valign="top" class="value">${fieldValue(bean:project, field:'id')}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Project Group:</td>
                            
                            <td valign="top" class="value">${fieldValue(bean:project, field:'group')}</td>
                            
                         </tr>

			 <tr class="prop">
                            <td valign="top" class="name">Project Code:</td>
                            
                            <td valign="top" class="value">${fieldValue(bean:project, field:'projectCode')}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Supervisor:</td>
                            
                            <td valign="top" class="value">${fieldValue(bean:project, field:'supervisor')}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Project Name:</td>
                            
                            <td valign="top" class="value">${fieldValue(bean:project, field:'projectName')}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Description:</td>
                            
                            <td valign="top" class="value">${fieldValue(bean:project, field:'description')}</td>
                            
                        </tr>

                    </tbody>
                </table>
            </div>
		
 		<g:if test="${!params.projectGroupId}">	
		<g:if test="${session.user.role.name == 'Supervisor' | session.user.role.name == 'Organiser'}">
		
		<div class="buttons">
		
                <g:form>
                    <input type="hidden" name="id" value="${project?.id}" />
                    <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
                </g:form>
                </div>
		</g:if>
		</g:if>

		<div class="paginateButtons">
                
		
		<!-- 
		<g:link class="home" controller="project" action="list" params="[projectGroupId:project.group.id]">Back</g:link> 
		-->
		<input type="button" value="Back" onClick="history.back()">
                </div>
        </div>
    </body>
</html>
